package com.mashibing.remote;

import com.mashibing.internalcommon.dto.Car;
import com.mashibing.internalcommon.dto.DriverCarBindingRelationship;
import com.mashibing.internalcommon.dto.DriverUser;
import com.mashibing.internalcommon.dto.ResponseResult;
import com.mashibing.internalcommon.request.DriverUserWorkStatus;
import com.mashibing.internalcommon.request.VerificationCodeDTO;
import com.mashibing.internalcommon.response.DriverUserExistsResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("service-driver-user")
public interface DriverUserClient {

    @RequestMapping(method = RequestMethod.POST, value = "/updateUser")
    ResponseResult updateUser(@RequestBody DriverUser driverUser);

    @RequestMapping(method = RequestMethod.GET, value = "/verificationDriverUser/{phoneNumber}")
    ResponseResult<DriverUserExistsResponse> verificationDriverUser(@PathVariable String phoneNumber);

    @RequestMapping(method = RequestMethod.GET, value = "/getDriverById/{carId}")
    ResponseResult<Car> getDriverById(@PathVariable String carId);

    @RequestMapping(method = RequestMethod.POST, value = "/checkVerificationCode")
    ResponseResult checkVerificationCode(@RequestBody VerificationCodeDTO verificationCodeDTO);

    @RequestMapping(method = RequestMethod.POST, value = "/updateStatus")
    ResponseResult updateStatus(@RequestBody DriverUserWorkStatus driverUserWorkStatus);

    @RequestMapping(method = RequestMethod.GET, value = "/getDriverCarRelationShip")
    ResponseResult<DriverCarBindingRelationship> getDriverCarRelationShip(@RequestParam String driverPhone);
}
